package com.googlecode.continuity.core.server.rpc;

import java.util.List;

import com.googlecode.continuity.core.client.rpc.ConfigurationRPC;
import com.googlecode.continuity.core.server.service.ConfigurationService;

/**
 * ConfigurationRPCImpl
 * <p/>
 * TODO: could this class use just a map?
 *
 * @author Peter Schmitt <aragos@aragos.de>
 */
public class ConfigurationRPCImpl implements ConfigurationRPC {
// ------------------------------ FIELDS ------------------------------

  private ConfigurationService configurationService;

// --------------------- GETTER / SETTER METHODS ---------------------

  public void setConfigurationService(ConfigurationService configurationService) {
    this.configurationService = configurationService;
  }

// ------------------------ INTERFACE METHODS ------------------------

// --------------------- Interface ConfigurationRPC ---------------------

  public void setConfigurations(List entries) {
    configurationService.setConfigurations(entries);
  }

  public String getValue(String code) {
    return configurationService.getValue(code);
  }

  public int getValueInteger(String code) {
    return configurationService.getValueInteger(code);
  }

  public List getConfigurations(List values) {
    return configurationService.getConfigurations(values);
  }
}
